<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <title>个人中心</title>
    <script src="__INDEX__/js/mui.min.js"></script>
	<link href="__INDEX__/css/mui.min.css" rel="stylesheet" />
	<link rel="stylesheet" href="__INDEX__/css/iconfont.css" />
	<link rel="stylesheet" href="__INDEX__/css/style.css" />
	<link rel="stylesheet" href="__INDEX__/css/mall.css" />	
</head>
<body>
	<div class="mui-content">
	    <div class="mem_top">
	    	<div class="mem_infobox clearfix">
		    	<div class="mem_toux">
		    		{if $info_user['logo'] == null}
		    		<img id="touxiang" src="__INDEX__/images/member.jpg">
		    		{else /}
		    		<img id="touxiang" src="{$info_user['logo']}">
		    		{/if}
		    	</div>
		    	<div class="mem_info">
		    		<p class="mem_name" id="user_name" >{$info_user['mobile']}</p>
		    		<p class="mem_dengji">姓名：<em id="user_type">{$info_user['user_name']}</em></p>	
		    		<p class="mem_shenj" id="mem_shenj"><a>普通会员</a></p>
		    	</div>
	    	</div>
	    	<ul class="walletlis clearfix">
	    		<li id="yj">
	    			<p>佣金</p>
	    			<p>￥<em id="yongjin">{$info_user['commission']}</em></p>
	    		</li>
	    		<li id="yu">
	    			<p>余额</p>
	    			<p>￥<em id="yue">{$info_user['balance']}</em></p>
	    		</li>
	    		<li id="jf">
	    			<p>鼓励金</p>
	    			<p>￥<em id="jifen">{$info_user['score']}</em></p>
	    		</li>
	    	</ul>
	    	
	    </div>
	    <ul class="mui-table-view mui-grid-view mui-grid-9 mem_indlist">
	    	{if $info_user.is_agent!=1}
	    	<li class="mui-table-view-cell mui-media">
				<a href="{:url('member/step1')}">
					<span class="mui-icon iconfont icon-dianpu1"></span>
					<div class="mui-media-body">申请开店</div>
				</a>
			</li>
			{/if}
			<li class="mui-table-view-cell mui-media">
				<a href="{:url('member/union')}">
					<span class="mui-icon iconfont icon-pintuanzhong"></span>
					<div class="mui-media-body">云商圈</div>
				</a>
			</li>
			<li class="mui-table-view-cell mui-media">
				<a href="{:url('member/friends')}">
					<span class="mui-icon iconfont icon-tianjiahuiyuan"></span>
					<div class="mui-media-body">推广中心</div>
				</a>
			</li>
			<li class="mui-table-view-cell mui-media">
				<a href="{:url('member/renzhen')}">
					<span class="mui-icon iconfont icon-daifahuo-copy" style="color: green;"></span>
					<div class="mui-media-body">实名认证</div>
				</a>
			</li>
			<li class="mui-table-view-cell mui-media" id="my_mobile" style="display: none;">
				<a href="{:url('member/shenqing')}">
					<span class="mui-icon iconfont icon-key"></span>
					<div class="mui-media-body">绑定手机</div>
				</a>
			</li>
			<li class="mui-table-view-cell mui-media" id="feedback">
				<a href="{:url('member/feedback')}">
					<span class="mui-icon iconfont icon-yjfk"></span>
					<div class="mui-media-body">意见反馈</div>
				</a>
			</li>
			<li class="mui-table-view-cell mui-media" id="login_out">
				<a href="javascript:;">
					<span class="mui-icon iconfont icon-tuichu"></span>
					<div class="mui-media-body">用户退出</div>
				</a>
			</li>
		</ul>
	</div>
	<nav class="mui-bar mui-bar-tab footer-list" id="footer-list">
		<a class="mui-tab-item" href="{:url('index/index')}">
			<span class="mui-icon iconfont icon-fujin"></span>
			<span class="mui-tab-label">附近</span>
		</a>
		<a class="mui-tab-item mui-active" href="{:url('member/index')}">
			<span class="mui-icon iconfont icon-huiyuan"></span>
			<span class="mui-tab-label">我的</span>
		</a>
	</nav>

</body>
</html>
{include file="public/footer" /}
<script type="text/javascript">
	mui.init();
	var aniShow = "pop-in";
	//页面跳转
	mui('#footer-list').on('tap', 'a', function() {
		var id = this.getAttribute('href');
		var href = this.href;
		mui.openWindow({
			id: id,
			url: this.href,
			show: {
				aniShow: aniShow
			},
			waiting: {
				autoShow: false
			}
		});
	});
</script>
<script>
	//个人资料
	$(".mem_infobox").click(function(){
	 parent.location.href="{:url('member/member')}"
	});
	//佣金
	$("#yj").click(function(){
	 parent.location.href="{:url('member/yongj_record')}"
	});
	//余额
	$("#yu").click(function(){
	 parent.location.href="{:url('member/yue_record')}"
	});
	//鼓励金
	$("#jf").click(function(){
	 parent.location.href="{:url('member/score_record')}"
	});
	
	$("#login_out").click(function(){
		layer.confirm('您确定要退出吗？', {
			btn: ['确定', '取消'] //按钮
		}, function() {
			$.ajax({
				url: "{:url('index/logout')}",
				data: {},
				success: function(data) {
					layer.msg("退出成功", {
						icon: 1,
						time: 1000
					}, function() {
						window.location.href = data.url;
					});
				}
			})
		})
	});
</script>
